#ifndef _DETU_MEDIA_VPSS_PIPE_IMP_H_
#define _DETU_MEDIA_VPSS_PIPE_IMP_H_

#include "vpss_pipe.h"
#include "mutex.h"

#include "hi_common.h"
#include "hi_comm_video.h"

namespace detu_media
{

class VpssGrpImp;

class VpssPipeImp : public VpssPipe
{
protected:
    VpssPipeImp(const VPSS_GRP grpId);
	
    virtual ~VpssPipeImp();

	friend class VpssGrpImp;

public:
    virtual S_Result start(void);
	
    virtual S_Result stop(void);
	
    virtual bool isStarted(void);
	
    virtual S_Result getId(int &id);
    
  //  virtual S_Result getVpssChnFrame(DT_VIDEO_FRAME_INFO_S* VideoFrameInfo, const int milliSec = -1);

private:
	S_Result init(const Json::Value& config);
	
    S_Result deInit(void);

    bool isInited(void);

private:
    VPSS_GRP_PIPE		fPipeId;
    VPSS_GRP			fGrpId;

	int                         fRef;
    bool                        fInited;
    detu_infra::Mutex           fMutex;

	Json::Value fBindCfg;
};

}

#endif

